package com.iplant.pdm.service.po.fmc;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.iplant.base.po.BasePO;
import com.iplant.base.po.enums.DBSchemas;
import com.iplant.base.utils.annotation.field.DBField;
import com.iplant.base.utils.annotation.condition.DBCondition;
import com.iplant.base.utils.annotation.join.DBJoin;
import com.iplant.base.utils.annotation.join.multi.DBJoinMulti;
import com.iplant.base.utils.annotation.po.DBBasePO;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 产线信息
 *
 * @author YouWang·Peng
 * 2024-3-10 13:33:04
 */
@DBBasePO(TableName = "fmc_line", CheckName = {"Code", "Name"}, Schemas = DBSchemas.PDM)
public class FMCLine extends BasePO implements Serializable {

    public FMCLine(){
        super();
    }

    @DBCondition
    @DBField
    public int FactoryID = 0;//工厂ID
    @DBJoin(name = "Code", tableName = "fmc_factory", tableAsName = "factory1", Schemas = DBSchemas.Basic,
            MainTableField = "FactoryID")
    public String FactoryCode = "";//工厂编码
    @DBJoin(name = "Name", tableName = "fmc_factory", tableAsName = "factory1", Schemas = DBSchemas.Basic,
            MainTableField = "FactoryID")
    public String FactoryName = "";//工厂名称
    @DBField
    public int ERPID = 0; // ERP对象ID666
    @DBField
    public String PLMCode = "";
    @DBField
    public List<String> ProductID = new ArrayList<String>();
    @DBJoinMulti(Name = "Code", MainTableField = "ProductID", TableName = "fpc_product", Schemas = DBSchemas.PDM)
    public String ProductNo = "";
    @DBJoinMulti(Name = "Name", MainTableField = "ProductID", TableName = "fpc_product", Schemas = DBSchemas.PDM)
    public String ProductName = "";

    @JsonProperty("FactoryID")
    public int getFactoryID() {
        return FactoryID;
    }

    public void setFactoryID(int factoryID) {
        FactoryID = factoryID;
    }

    @JsonProperty("FactoryCode")
    public String getFactoryCode() {
        return FactoryCode;
    }

    public void setFactoryCode(String factoryCode) {
        FactoryCode = factoryCode;
    }

    @JsonProperty("FactoryName")
    public String getFactoryName() {
        return FactoryName;
    }

    public void setFactoryName(String factoryName) {
        FactoryName = factoryName;
    }

    @JsonProperty("ERPID")
    public int getERPID() {
        return ERPID;
    }

    public void setERPID(int ERPID) {
        this.ERPID = ERPID;
    }

    @JsonProperty("PLMCode")
    public String getPLMCode() {
        return PLMCode;
    }

    public void setPLMCode(String PLMCode) {
        this.PLMCode = PLMCode;
    }

    @JsonProperty("ProductID")
    public List<String> getProductID() {
        return ProductID;
    }

    public void setProductID(List<String> productID) {
        ProductID = productID;
    }

    @JsonProperty("ProductNo")
    public String getProductNo() {
        return ProductNo;
    }

    public void setProductNo(String productNo) {
        ProductNo = productNo;
    }

    @JsonProperty("ProductName")
    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String productName) {
        ProductName = productName;
    }
}
